<template>
  <a-card :bordered="false">
    <form-redirect :func="func" :formId="formId" :formCode="formCode" :fks="fks" @close="close"
                   @refreshParent="refreshParent" @setTitle="setTitle"></form-redirect>
  </a-card>
</template>

<script>

  import FormRedirect from "./FormRedirect";

  export default {
    name: 'FormRedirectPage',
    components: {
      FormRedirect
    },
    data() {
      return {
        func: null,
        formId: null,
        formCode: null,
        fks: null
      }
    },
    methods: {
      //关闭页面
      close() {
        // //console.log("close");
      },
      //刷新父页面
      refreshParent() {
        // //console.log("refreshParent");
      },
      //设置标题
      setTitle(title) {
        document.title = title;
      }
    },
    created() {
      document.title = this.$t('m.eform.formDesign.label.biao-dan-ye-mian');
      this.func = this.$route.params.func;
      this.formId = this.$route.params.formId;
      this.formCode = this.$route.params.formCode;
      const pkName = this.$route.params.pkName;
      const pkValue = this.$route.params.pkValue;
      if (pkName && pkValue) {
        this.fks = [{
          colCode: pkName,
          queryValue: pkValue
        }];
      }
    }
  }
</script>
